package com.common.entity;
/*
  @author author
  @create 2020-11-18:0:17
  用户实体类
*/



import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "用户表")
public class User implements Serializable {

    @ApiModelProperty(value = "主键")
    //设置表的主键以及主键类型
    @TableId(value = "user_id",type = IdType.ID_WORKER_STR)
    private String userId;

    @ApiModelProperty(value = "账号")
    private String userPhone;

    @ApiModelProperty(value = "密码")
    private String userPassword;

    @ApiModelProperty(value = "头像")
    private String userHeadshot;

    @ApiModelProperty(value = "昵称")
    private String userNickname;

    @ApiModelProperty(value = "逻辑删除标志位")
    @TableLogic
    private Integer userLogicflage;

    @ApiModelProperty(value = "乐观锁版本号")
    @Version
    private Integer userVersion;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date userCreatedate;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date userUpdatedate;
}
